import java.io.Serializable;
public class Student implements Serializable{
    private static final long serialVersionUID = 1L;
    private String studentId;
    private String studentName;
    private String classId;
    private String groupId;
    private double attendance = 0;  // 改为double类型以支持小数分数

    public Student(String studentId, String studentName, String classId, String groupId) {
        this.studentId = studentId;
        this.studentName = studentName;
        this.classId = classId;
        this.groupId = groupId;
    }

    // Getters and Setters
    public String getStudentId() { return studentId; }
    public void setStudentId(String studentId) { this.studentId = studentId; }
    public String getStudentName() { return studentName; }
    public void setStudentName(String studentName) { this.studentName = studentName; }
    public String getClassId() { return classId; }
    public void setClassId(String classId) { this.classId = classId; }
    public String getGroupId() { return groupId; }
    public void setGroupId(String groupId) { this.groupId = groupId; }
    public double getAttendance() { return attendance; }
    public void setAttendance(double attendance) { this.attendance = attendance; }

    @Override
    public String toString() {
        return studentName;
    }
}
